package com.fzy.common.queue.worker;

import com.fzy.common.util.StringUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.concurrent.ConcurrentLinkedQueue;

public class RubbishWorker extends Worker {

    public final static String DUANTING_CHANNEL = "01";

    private static final Logger LOGGER = LoggerFactory.getLogger(RubbishWorker.class);

    private String channels;

    public RubbishWorker() {
        super();
        if (StringUtil.isEmpty(this.channels)) {
            this.channels = DUANTING_CHANNEL;
        }
    }

    public RubbishWorker(String channels) {
        super();
        this.channels = channels;
    }

    @Override
    public void setTaskQueue(ConcurrentLinkedQueue<Task> taskQueue) {
        this.taskQueue = taskQueue;
    }

    @Override
    public Object handle(Task input) {

        // 获取任务数据
        // RubbishTask task = (RubbishTask) input;
        LOGGER.info("[消费者线程]，消费渠道[{}],开始消费数据:{}");

        Object output = null;

        try {


        } catch (Exception e) {
            e.printStackTrace();
        }
        LOGGER.info("[消费者线程],消费渠道[{}],消费数据结束,任务 {} 处理完毕...");
        return output;
    }
}
